import pandas as pd
df = pd.DataFrame({'商品':['苹果','香蕉','梨','香蕉'],'单价(元)':[4,5,4,5],'销量（kg）':[100,120,105,120],'库存（kg）':[50,60,70,60]})
print(df)
print(df.duplicated())
print(df.duplicated('单价(元)'))
print(df.duplicated('单价(元)',keep='last'))
print(df.drop_duplicates())
print(df.drop_duplicates(keep=False))
print(df.drop_duplicates(keep=False,ignore_index=True))